/**
 * crawler
 *
 * outlook@China software studio
 * Copyright (c) 2008-2011. All Rights Reserved.
 * http://www.outlook.com
 */

package org.outlook.common.data;

/**
 * function:
 * 
 * @author watson email: watson.wu@hotmail.com
 * @date 2011-4-27
 */
public class KeyValue {

	private String Key;
	private Object value;

	public KeyValue(String key, Object object) {
		super();
		Key = key;
		this.value = object;
	}

	public String getKey() {
		return Key;
	}

	public void setKey(String key) {
		Key = key;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object object) {
		this.value = object;
	}

	@Override
	public boolean equals(Object obj) {
		if(super.equals(obj)) return true;
		if(obj instanceof KeyValue) {
			KeyValue keyValue = (KeyValue) obj;
			if(keyValue.getKey().equals(getKey()) && keyValue.getValue().equals(value))
				return true;
		}
		return false;
	}

	@Override
	public String toString() {
		return this.getKey()+"="+getValue();
	}

}
